package net.cooltain.warhammer.running.window.popupItem;

import java.awt.event.ActionEvent;

import net.cooltain.utils.Logger;
import net.cooltain.warhammer.framework.constant.ConstantPlayZone;
import net.cooltain.warhammer.running.entity.MotionCard;
import net.cooltain.warhammer.running.event.MoveCardEvent;

public abstract class PlayDeveloperToZoneItem extends CardPopupItem {

	private static final long serialVersionUID = -4660714024564957806L;
	
	protected Integer targetZone;
	
	public PlayDeveloperToZoneItem(String itemName, MotionCard card ,Integer targetZone) {
		super(itemName, card);
		this.targetZone = targetZone;
	}

	@Override
	protected void menuItem_actionPerformed(ActionEvent e) {
		
		motionCard.setDevelopment( true );
		motionCard.setFlip(true);
		motionCard.player.allowDeveloperSet --;
		
		// 移动卡片
		MoveCardEvent.moveACard(motionCard, targetZone);
		Logger.info("从手牌打出"+motionCard.cardEntity.getName()
				+"到"+ConstantPlayZone.allZone.get(targetZone)+" 做为设施卡");
	}

	

}
